package com.omt.tarjimdinek.conversation;

import javax.servlet.http.HttpServletRequest;

/**
 * Interface to create Conversation given an incoming http request.
 * The requested URI determines which conversation should be created.
 */
public interface ConversationFactory {

    /**
     * Whether this factory can create a {@link Conversation} for the given request.
     */
    boolean canCreateConversation(HttpServletRequest request);

    /**
     * Create a new {@link Conversation} for the given request.
     */
    Conversation createConversation(HttpServletRequest request);
}